-- GENERATED SPELL FOR [Zul'Brin Warpbranch] --


function spell0_10823(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(20831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10823', 3000, 1)
end

function spell1_10823(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10823', 12000, 1)
end

function spell2_10823(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(12491,pUnit)
pUnit:RegisterEvent('Sorts_10823', 3000, 1)
end

function spell3_10823(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(17172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10823', 5268, 1)
end

function Sorts_10823(pUnit, Event)
local choix_sorts_10823 = math.random(0, 3)
if choix_sorts_10823 == 0 then
pUnit:RegisterEvent('spell0_10823', 1, 1)
end
if choix_sorts_10823 == 1 then
pUnit:RegisterEvent('spell1_10823', 1, 1)
end
if choix_sorts_10823 == 2 then
pUnit:RegisterEvent('spell2_10823', 1, 1)
end
if choix_sorts_10823 == 3 then
pUnit:RegisterEvent('spell3_10823', 1, 1)
end
end

function mob10823_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10823', math.random(1500, 3000), 1)
end

function mob10823_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10823_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10823_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10823, 1, 'mob10823_Action')
RegisterUnitEvent(10823, 2, 'mob10823_Leave')
RegisterUnitEvent(10823, 3, 'mob10823_Kill')
RegisterUnitEvent(10823, 4, 'mob10823_Die')
